<html>
<head>
<title></title>
</head>
<body>
<script>
try {
  var d = new Date().toString();
  echoJava.echo(d, function(msg) {
    document.write(msg + "<br>");
    var expected = "From java:" + d;
    if (msg === expected) {
      document.write("Async echo <font color=green>passed</font>.");
      document.title = "Pass";
    } else {
      document.write("Async echo <font color=red>failed</font>.");
      document.title = "Fail";
    }
    document.close();
  });
} catch(e) {
  console.log(e);
  document.title = "Fail";
}
</script>
</body>
</html>
